package com.letian.info.mapper;

import java.util.List;
import com.letian.info.domain.InfoArticle;
import com.letian.info.domain.InfoComment;
import org.apache.ibatis.annotations.Param;

/**
 * 文章信息Mapper接口
 * 
 * @author bmz
 * @date 2023-04-05
 */
public interface InfoArticleMapper 
{
    /**
     * 查询文章信息
     * 
     * @param articleId 文章信息主键
     * @return 文章信息
     */
    public InfoArticle selectInfoArticleByArticleId(Long articleId);

    /**
     * 查询文章信息
     *
     * @param title 文章信息主键
     * @return 文章信息
     */
    public List<InfoArticle> queryArticleList(@Param("title") String title, @Param("userName") String userName);

    /**
     * 查询文章信息列表
     * 
     * @param infoArticle 文章信息
     * @return 文章信息集合
     */
    public List<InfoArticle> selectInfoArticleList(InfoArticle infoArticle);

    /**
     * 查询文章信息列表
     *
     * @param infoArticle 文章信息
     * @return 文章信息集合
     */
    public List<InfoArticle> selectInfoArticleListByLabel(@Param("infoArticle")InfoArticle infoArticle, @Param("userName")String userName);

    /**
     * 查询关注的文章信息列表
     *
     * @param infoArticle 文章信息
     * @return 文章信息集合
     */
    public List<InfoArticle> selectInfoLikeArticleList(@Param("infoArticle")InfoArticle infoArticle, @Param("userName")String userName);

    /**
     * 新增文章信息
     * 
     * @param infoArticle 文章信息
     * @return 结果
     */
    public int insertInfoArticle(InfoArticle infoArticle);

    /**
     * 修改文章信息
     * 
     * @param infoArticle 文章信息
     * @return 结果
     */
    public int updateInfoArticle(InfoArticle infoArticle);

    /**
     * 删除文章信息
     * 
     * @param articleId 文章信息主键
     * @return 结果
     */
    public int deleteInfoArticleByArticleId(Long articleId);

    /**
     * 批量删除文章信息
     * 
     * @param articleIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInfoArticleByArticleIds(Long[] articleIds);

    /**
     * 批量删除评论信息
     * 
     * @param objectIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInfoCommentByObjectIds(@Param("objectType") String objectType,@Param("objectIds")  Long[] objectIds);
    
    /**
     * 批量新增评论信息
     * 
     * @param infoCommentList 评论信息列表
     * @return 结果
     */
    public int batchInfoComment(List<InfoComment> infoCommentList);
    

    /**
     * 通过文章信息主键删除评论信息信息
     * 
     * @param objectId 文章信息ID
     * @return 结果
     */
    public int deleteInfoCommentByObjectId(@Param("objectType") String objectType, @Param("objectId") Long objectId);
}
